#include "xmlbuilder.h"

QDomDocument XmlBuilder::MakeXml(QString name, QList<Para> args)
{
    QDomDocument doc = QDomDocument();
    doc.createProcessingInstruction("xml", "version=\"1.0\" encoding=\"utf-8\"");
    QDomElement main = doc.createElement(name);
    doc.appendChild(main);
    foreach (Para p, args)
    {
        main.appendChild(p.MakeNode());
    }
    return doc;
}
